<!-- #include file="inc/_constants.asp" -->
<!-- #include file="inc/_helpers.asp" -->
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Northwind</title>
    <!-- #include file="inc/_stylesheets.asp" -->
</head>

<body>
    <!-- #include file="inc/_top_menu.asp" -->

    <div class="pure-g">
        <div class="pure-u-1-8">

            <div id="menu">
                <div class="pure-menu">
                    <a class="pure-menu-heading" href="#">Company</a>

                    <ul class="pure-menu-list">
                        <li class="pure-menu-item"><a href="#" class="pure-menu-link">Home</a></li>
                        <li class="pure-menu-item"><a href="#" class="pure-menu-link">About</a></li>

                        <li class="pure-menu-item" class="menu-item-divided pure-menu-selected">
                            <a href="#" class="pure-menu-link">Services</a>
                        </li>

                        <li class="pure-menu-item"><a href="#" class="pure-menu-link">Contact</a></li>
                    </ul>
                </div>
            </div>

        </div>
        <div class="pure-u-7-8">
            
            <div class="pure-g">

            <div class="pure-u-1">
                <p>
                    <button class="pure-button pure-button-primary">Place New Order</button>
                </p>
            </div>

            <!--<div class="pure-u-1-3"> 1... </div>
            <div class="pure-u-1-3"> 2... </div>
            <div class="pure-u-1-3"> 3... </div>-->

            <div class="pure-u-1">
        <%
            Dim dbConn, rsOrderList, strSql

            Set dbConn = Server.CreateObject("ADODB.Connection")
            Set rsOrderList = Server.CreateObject("ADODB.Recordset")

            strSql = "SELECT * FROM Orders;"

            dbConn.Open  dbNorthwind
            Set rsOrderList =  dbConn.Execute(strSql)

            If Not (rsOrderList.BOF And rsOrderList.EOF) Then
        %>
                <table class="pure-table pure-table-horizontal">
                    <thead>
                        <tr>
                            <th>#</th>
                            <th>Customer</th>
                            <th>Employee</th>
                            <th>Order Date</th>
                            <th>Required Date</th>
                            <th>Shipped Date</th>
                        </tr>
                    </thead>
                    <tbody>
        <%
                While (Not rsOrderList.EOF)
        %>
                        <tr>
                            <td><%=rsOrderList("OrderID")%></td>
                            <td><%=rsOrderList("CustomerID")%></td>
                            <td><%=rsOrderList("EmployeeID")%></td>
                            <td><%=rsOrderList("OrderDate")%></td>
                            <td><%=rsOrderList("RequiredDate")%></td>
                            <td><%=rsOrderList("ShippedDate")%></td>
                        </tr>
        <%
                    rsOrderList.MoveNext
                Wend
        %>
                    </tbody>
                </table>
        <%
            End If

            rsOrderList.Close
            dbConn.Close

            Set rsOrderList = Nothing
            Set dbConn = Nothing
        %>
            </div>
        </div><!-- <div class="pure-g"> -->


        </div>
        
    </div>

    

    
    <p>&nbsp;</p>
</body>
</html>

